#pragma once

#include "World.h"

class Engine{
	public:
		~Engine();

		static Engine* pInstance;

		static Engine* getInstance();

		void changeState(int newState);
		void mainLoop();
	private:
		Engine();
		Engine(const Engine&);
		Engine &operator = (const Engine&);

		bool running;

		int ticks;
		int getTicks();
		void startTimer();
		
		void manageState();

		int state;

		enum State {STATE_NULL, STATE_MENU, STATE_PLAYING, STATE_END};

		GameState *currentState;
};